<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>WELCOME TO FILE MANAGER!!!</title>
</head>
<body>
<%
String[] list = request.getParameterValues("button");
String[] list2 = request.getParameterValues("check");

//convert strings to bytes to prevent errors with encodings
if (list2 == null)
	session.setAttribute("list", null);
else
{
	byte[][] byt = new byte[list2.length][];
	for (int i = 0; i < list2.length; i++)
		byt[i] = list2[i].getBytes("ISO-8859-1");
	session.setAttribute("list", byt);
}

if (list[0].equals("Delete selected"))
	response.sendRedirect("Delete.jsp");
else
	response.sendRedirect("Displace.jsp");
	
%>

</body>
</html>